project(xncc_log)

include(../head.cmake)

# include dir
include_directories(./inc)
include_directories(../include)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)

# add source file
aux_source_directory(./src/ SRC_FILES)

# libname
add_library(${PROJECT_NAME}_static STATIC ${SRC_FILES})

add_library(${PROJECT_NAME} SHARED ${SRC_FILES})

set(INC_LIB ${CMAKE_CURRENT_SOURCE_DIR}/../lib)

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/lib ${INC_LIB})